Skip to content

otel: replace cobraotel with native lifecycle management#3108

Open
Jdepp007004 wants to merge 2 commits intoauthzed:mainfrom
Jdepp007004:fix/otel-lifecycle-native
Open

otel: replace cobraotel with native lifecycle management#3108
Jdepp007004 wants to merge 2 commits intoauthzed:mainfrom
Jdepp007004:fix/otel-lifecycle-native

Conversation

@Jdepp007004
Copy link
Copy Markdown
Contributor

commited and pushed the vendor directory by mistake so another commit to fix it

Fixes authzed#712 and authzed#3095.

- Remove dependency on github.com/jzelinskie/cobrautil/v2/cobraotel
- Replicate OTel provider initialization natively in pkg/cmd/server/otel.go
- Wire TracerProvider into serve.go signal handler so Shutdown and
  ForceFlush are called on SIGTERM/SIGINT, preventing span loss on exit
- Fix vendored cobrautil Viper global singleton bug: viper.SetEnvPrefix
  was mutating global state instead of the local instance (v.SetEnvPrefix)
- Touch pkg/cmd/util/util.go only to break import cycle between
  pkg/cmd/util and pkg/cmd/server; all flag registrations unchanged
- Add 20 tests across unit, integration, and system build tags
@Jdepp007004 Jdepp007004 requested a review from a team as a code owner May 9, 2026 14:47
@github-actions github-actions Bot added area/cli Affects the command line area/dependencies Affects dependencies area/tooling Affects the dev or user toolchain (e.g. tests, ci, build tools) labels May 9, 2026
@Jdepp007004 Jdepp007004 closed this May 9, 2026
@Jdepp007004 Jdepp007004 reopened this May 9, 2026
@Jdepp007004 Jdepp007004 changed the title removes vendor directory from tracking otel: replace cobraotel with native lifecycle management May 9, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators May 9, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area/cli Affects the command line area/dependencies Affects dependencies area/tooling Affects the dev or user toolchain (e.g. tests, ci, build tools)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant